package cn.iocoder.yudao.module.promotion.api.agent;

import cn.iocoder.yudao.module.promotion.dal.dataobject.agent.AgentDO;
import cn.iocoder.yudao.module.promotion.service.agent.AgentService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

@Service
@Validated
public class AgentApiImpl implements AgentApi {

    @Resource
    private AgentService agentService;

    @Override
    public String getAgentQr() {
        AgentDO agent = agentService.getAgent();
        return agent == null ? "" : agent.getQr();
    }
}
